home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 31
/
Aminet 31 (1999)(Schatztruhe)[!][Jun 1999].iso
/
Aminet
/
dev
/
c
/
GAPLib.lha
/
GAPLib_Beta
/
wrappers
/
c_plus_plus
/
wrapper.cc
< prev
Wrap
C/C++ Source or Header
|
1999-04-22
|
767b
|
50 lines
#include <GAP.hh>
GPopulation::GPopulation(int Num,int Size,struct TagItem *TagList)
{
this->Pop = CreatePopulation(Num,Size,TagList);
}
GPopulation::GPopulation(int Num,int Size)
{
this->Pop = CreatePopulation(Num,Size,0);
}
GPopulation::~GPopulation()
{
DeletePopulation(this->Pop);
}
struct Popstat *GPopulation::GetStats(void)
{
return(&this->Pop->Stat);
}
void *GPopulation::GetMember(int n)
{
return(PopMember(this->Pop,n));
}
void GPopulation::Evolve(struct TagItem *TagList)
{
this->Pop = ::Evolve(this->Pop,TagList);
}
int GPopulation::GetSize(void)
{
return(this->Pop->NumPolys);
}
void GPopulation::SetSize(int newsize)
{
if(newsize>0) {
this->Pop->NumPolys = newsize;
}
}
int GPopulation::GetGeneration(void)
{
return(this->Pop->Generation);
}